

clear
freduse GDPC1, clear /* read in data */
gen qtr=_n
tsset qtr
gen ln_gdp=log(GDPC1)
tsfilter hp ln_gdp_hp=ln_gdp /* perform hp filter */
gen yr=year(daten)
replace date=substr(date,1,7) /* shorten date to make more readable label */
replace date="" if abs(ln_gdp_hp)<.025 /* only include date labels for extreme dates */
qnorm ln_gdp_hp //if yr<=2015, mlabel(date) mlabsize(vsmall) msize(vsmall)
